package cn.wubo.flow.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.function.RouterFunction;
import org.springframework.web.servlet.function.RouterFunctions;
import org.springframework.web.servlet.function.ServerResponse;

import java.net.URI;

@Configuration
public class FLowConfiguration {

    @Bean("wb04307201FLowRouter")
    public RouterFunction<ServerResponse> flowRouter() {
        return RouterFunctions.route()
                .GET("/", request -> ServerResponse.seeOther(URI.create("/index.html")).build())
                .GET("/index", request -> ServerResponse.seeOther(URI.create("/index.html")).build())
                .build();
    }
}
